#!/usr/bin/perl
use utf8;

chomp( @strings = <STDIN> );
print reverse @strings;